import Vue from "vue";
import App from "./App.vue";
// 导入路由
import router from "./router";
//路由前置守卫
import "@/router/permission.js";
import VueRouter from "vue-router";
import ElementUI from "element-ui";
import "element-ui/lib/theme-chalk/index.css";
import Directives from "./directives";
// 导入vuex
import store from "./store";

Vue.config.productionTip = false;

// 注册VueRouter插件
Vue.use(VueRouter);
// 全局指令
Vue.use(Directives);
// 全局组件
Vue.use(ElementUI);
// vuex
Vue.use(store);

new Vue({
  store,
  router, // 使用路由
  render: (h) => h(App),
}).$mount("#app");
